home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 26
/
CU Amiga Magazine's Super CD-ROM 26 (1998)(EMAP Images)(GB)[!][issue 1998-09].iso
/
C
/
MakeAssigns
< prev
next >
Wrap
Text File
|
1997-06-18
|
1KB
|
53 lines
/* $VER: MakeAssigns 1.1 (23.12.96) by Neil Bothwick */
/* Sets up or removes system assigns and paths for a CD */
/* Usage: MakeAssigns [REMOVE] */
/* The assigns must be defines in S:CUCDassigns in the format */
/* AssignName: Path */
/* and the paths in S:CUCDpaths in the format */
/* Path */
parse arg switch
if upper(switch) = 'REMOVE' then do
call DoPaths
call DoAssigns
end
else do
call DoAssigns
call DoPaths
end
exit
DoAssigns:
if ~open(AssList,'S:CUCDassigns','R') then exit
do until eof(AssList)
Line = readln(AssList)
if left(Line,1) = ';' then iterate
if words(Line) ~= 2 then iterate
parse var Line Name Path .
cmdstr = 'assign >NIL:' '"'Name'"' '"'Path'"'
if upper(switch) = 'REMOVE' then cmdstr = cmdstr 'REMOVE'
address command cmdstr
end
call close(AssList)
return
DoPaths:
if ~open(PathList,'S:CUCDpaths','R') then exit
do until eof(PathList)
Path = readln(PathList)
if left(Path,1) = ';' then iterate
if words(Path) ~= 1 then iterate
cmdstr = 'Path >NIL:' '"'Path'"'
if upper(switch) = 'REMOVE' then cmdstr = cmdstr 'REMOVE'
else CmdStr = CmdStr 'ADD'
address command cmdstr
end
call close(PathList)
return